package com.wlz.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wlz
 * @date 2022-06-26  6:59 下午
 */
@RestController
public class ProductController {


    @Value("${server.port}")
    private String port;

    @Value( "${spring.application.name}" )
    private String name;

    @GetMapping("/getInfo")
    public String getServerPortAndName(){
        return  this.name +" : "+ this.port;
    }

}
